// Package types defines common types used across GoCelery packages
package types

import "time"

// TaskFunc is a function that processes a task
type TaskFunc func(args []interface{}, kwargs map[string]interface{}) (interface{}, error)

// Task represents a task to be executed
type Task struct {
	ID        string
	Name      string
	Args      []interface{}
	Kwargs    map[string]interface{}
	Retries   int
	ETA       *time.Time
	ExpiresAt *time.Time
}

// TaskResult represents the result of a task execution
type TaskResult struct {
	TaskID    string
	Status    string
	Result    interface{}
	Traceback string
	Error     string
}

// Constants for task status
const (
	StatusPending = "PENDING"
	StatusStarted = "STARTED"
	StatusRetry   = "RETRY"
	StatusFailure = "FAILURE"
	StatusSuccess = "SUCCESS"
	StatusRevoked = "REVOKED"
)
